ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
SIU.c File Reference

System Integration Unit - Pins and routing. More...

#include "derivative.h"
#include "SIU.h"

Functions

void vfnConfigDefaultPinBehavior (const uint16_t *pu16Config, uint8_t u8Offset, uint8_t u8ConfigSize)
 Will configure a number of contiguous pins for a particular behavior - input, output, or routed to a specific module.
void vfnToggleOutputPin (const uint8_t u8Port, const uint8_t u8Pin, const uint8_t u8Level)
 Will force an output pin to either a high or a low logical level.
uint8_t u8fnReadPin (const uint8_t u8Port, const uint8_t u8Pin)
 Will return the current level for a given pin.
uint8_t u8fnReturnPinIndex (const uint8_t u8Port, const uint8_t u8Pin)
 Will return the global index for a given port and pin number.
uint8_t u8fnRouteInputPad (const uint8_t u8Module, const uint8_t u8PinIndex)
 Will route and input pad to the correct peripheral.
uint8_t u8fnIRQConfig (uint8_t u8Channel, IRQConfig_t tConfig)
 Will configure an IRQ channel according to the passed argument.
void vfnIRQClearIsrFlag (uint8_t u8Channel)
 Clears the appropriate Isr flag for a given channel.

Detailed Description

System Integration Unit - Pins and routing.

Copyright (c) 2011 Freescale Semiconductor Freescale Confidential Proprietary

Author:
Freescale Semiconductor
SASD Automotive
R11515
Version:
Date:
Warning:
(If needed)

History:


Function Documentation

uint8_t u8fnIRQConfig ( uint8_t  u8Channel,
IRQConfig_t  tConfig 
)

Will configure an IRQ channel according to the passed argument.

Parameters:
u8Channel,:IRQ channel (from 0 to 31) to be configured.
tConfig,:Configuration for the IRQ channel according to IRQConfig_t. Passed values include Rising and/or falling edge detection, glitch filter enabling, and interrupt enable bit.
Returns:
Always clear.
uint8_t u8fnReadPin ( const uint8_t  u8Port,
const uint8_t  u8Pin 
)

Will return the current level for a given pin.

Parameters:
u8PortPort to which the pin belongs. Passed argument should be ASCII representation of port. I.E. for port A, the passed argument should be 'A' or 0x41.
u8PinPin number in the port. This value should NOT be ASCII.
Returns:
0 or 1, depending on the logical level at the pin; SIU_INVALID_PIN_CONFIGURATION in case the pin is not configured neither as input nor output.
Note:
Pin must be configured as input for this result to be valid
uint8_t u8fnReturnPinIndex ( const uint8_t  u8Port,
const uint8_t  u8Pin 
)

Will return the global index for a given port and pin number.

Parameters:
u8PortPort to which the pin belongs. Passed argument should be ASCII representation of port. I.E. for port A, the passed argument should be 'A' or 0x41.
u8PinPin number in the port. This value should NOT be ASCII.
Returns:
Global pin index, as used by GDPO, GDPI, PCR, and other registers
uint8_t u8fnRouteInputPad ( const uint8_t  u8Module,
const uint8_t  u8PinIndex 
)

Will route and input pad to the correct peripheral.

Parameters:
u8ModuleInput pad number as listed in PAD_INPUT_CHANNELS enum.
u8PinIndexIndex number for the appropriate pins, as listed by PAD_SELx defines and as specified in the device's reference manual.
Returns:
PAD_DOES_NOT_EXIST in case the pad is not found; CLEAR otherwise.
void vfnConfigDefaultPinBehavior ( const uint16_t *  pu16Config,
uint8_t  u8Offset,
uint8_t  u8ConfigSize 
)

Will configure a number of contiguous pins for a particular behavior - input, output, or routed to a specific module.

Parameters:
pu16ConfigPointer to configuration value. This register will be placed in the adequate PCR register.
u8OffsetStarting pin number.
u8ConfigSizeNumber of contiguous pins to config.
Returns:
void.
void vfnIRQClearIsrFlag ( uint8_t  u8Channel)

Clears the appropriate Isr flag for a given channel.

Parameters:
u8Channel,:IRQ channel (from 0 to 31).
Returns:
Void.
void vfnToggleOutputPin ( const uint8_t  u8Port,
const uint8_t  u8Pin,
const uint8_t  u8Level 
)

Will force an output pin to either a high or a low logical level.

Parameters:
u8PortPort to which the pin belongs. Passed argument should be ASCII representation of port. I.E. for port A, the passed argument should be 'A' or 0x41.
u8PinPin number in the port. This value should NOT be ASCII.
u8LevelCLEAR for 0, any other value for 1.
Returns:
void.
Note:
The corresponding pin must be configured as output for the result to be effective